# json是一种带有格式的字符串类型数据，用于不同服务器和编程语言间传输数据
import json

xiaoming_dict = {
    'name': '小明',
    'age': 13
}
xiaoming_json_str = json.dumps(xiaoming_dict)
print(type(xiaoming_json_str), xiaoming_json_str)

xiaoming_json_str = """
    {
        "name": "小明", 
        "age": 13,
        "parent": [
            {},
            {}
        ]
    }
"""
xiaoming_dict = json.loads(xiaoming_json_str)
print(type(xiaoming_dict), xiaoming_dict)